package lesson07.train;

public class Test {
    public void diving(Dive dive){
        dive.dive();
    }
    public void sprinting(Sprint sprint){
        sprint.sprint();
    }
    public static void main(String[] args) {
        Test test = new Test();
        test.sprinting(new SprintAthlete("张飞",20));
        AllAthlete allAthlete = new AllAthlete("关羽",25);
        test.diving(allAthlete);
        test.sprinting(allAthlete);
    }
}
